#pragma once
#include <cocos2d.h>
#include "pugixml.hpp"

using namespace pugi;
USING_NS_CC;

class Item;

class ItemFactory : public CCObject
{
public:
	ItemFactory(void);
	~ItemFactory(void);

	bool init();
	void parseXml(xml_node node);
	Item* createItem();

	CC_SYNTHESIZE_RETAIN(CCString*, _id, Id);
	CC_SYNTHESIZE_RETAIN(CCString*, _processor, Processor);
	CC_SYNTHESIZE(CCSize, _bound, Bound);
	CC_SYNTHESIZE_RETAIN(CCArray*, _listResource, Resources);

	CREATE_FUNC(ItemFactory);
};

